﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CDStore3Tiers;

namespace CuaHangDiaNhac
{
	public partial class frmInDiaNhacBaiHat : Form
	{
		StoreCDDataContext db;
		public frmInDiaNhacBaiHat(int madia)
		{
			InitializeComponent();
			db = new StoreCDDataContext();
			db.Connection.ConnectionString = getConfig.getConnection();
			this.Text += madia.ToString();
		}
		private void frmInDiaNhacBaiHat_Load(object sender, EventArgs e)
		{
			db = new StoreCDDataContext();
			db.Connection.ConnectionString = getConfig.getConnection();
			int madia = Convert.ToInt32(this.Text.Substring(42));
			vw_DiaNhac_BaiHatBindingSource.DataSource = db.vw_DiaNew_SelectByID(madia);
			vw_DiaNewBindingSource.DataSource = db.vw_DiaNhacBaiHat_SelectAll(madia);
			this.reportViewer1.RefreshReport();
		}
	}
}
